package com.jiang.common;

/**
 * 公共返回码
 *
 * @author Liusf
 */
public enum ApiCode {
    SUCCESS(200, "请求成功"),
    FAILED(400, "请求失败"),
    VALIDATE_FAILED(404, "资源不存在"),
    SYSTEM_ERROR(500, "服务器异常"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问");

    private final int code;
    private final String message;

    ApiCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}
